Uniform-Cost Search
Definition:
Uniform-Cost Search (UCS) is a search algorithm that expands the node with the lowest cost first, ensuring that it finds the least-cost path in weighted graphs. UCS is similar to Dijkstra's algorithm but is often applied in AI and pathfinding scenarios.
Video Explanation**

Characteristics:
- Lowest Cost Path: Always expands the node with the lowest path cost.
- Optimal: Guarantees an optimal solution for paths with non-negative weights.
- Uninformed: Does not use heuristics and is a type of uninformed search.
How Uniform-Cost Search Works:
- Initialize: Start with the root node.
- Expand Node: Choose the node with the lowest cumulative path cost.
- Add Neighbors: Add unvisited neighbors with updated path costs.
- Repeat: Continue until reaching the goal or emptying the priority queue.
Time Complexity:
- Time Complexity: (O(b^d)) where
bis the branching factor anddis the depth of the goal.